package com.jnu.student.data;
import java.io.Serializable;
import java.time.LocalDate;

public class Bill implements Serializable {
    private String title;         // 名称
    private double amount;        // 金额
    private LocalDate date;       // 日期

    public Bill(String title, double amount, LocalDate date) {
        this.title = title;
        this.amount = amount;
        this.date = date;
    }

    public String getTitle() {
        return title;
    }

    public double getAmount() {
        return amount;
    }

    public int getDay() {
        return date.getDayOfMonth(); // 返回月份中的某一天，范围为 1 到 31
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public void setAmount(double amount) {
        this.amount = amount;
    }

    public void setDate(LocalDate date) {
        this.date = date;
    }
}